#ifndef __INCLUDED_CBL_POOLMANAGER_H__
#error "CBL_PoolManager.hpp must not be used directly. Use CBL_PoolManager.h instead."
#else
#ifndef __INCLUDED_CBL_POOLMANAGER_HPP__
#define __INCLUDED_CBL_POOLMANAGER_HPP__

template <typename TClassName>
inline TClassName* CPoolManager::Allocate()
{
	CFreeList* pObjectList = FindListForSize(sizeof(TClassName));
    TClassName* pObject = pObjectList->Allocate<TClassName>();
    return pObject;
}

// ---------------------------------------------------------------------------------------------------------------------

inline void* CPoolManager::Allocate(size_t _Size)
{
	CFreeList* pObjectList = FindListForSize(_Size);
    return pObjectList->Allocate(_Size);
}

// ---------------------------------------------------------------------------------------------------------------------

template <typename TClassName>
inline void CPoolManager::Free(TClassName* _pObject)
{
	CFreeList* pObjectList = FindListForSize(sizeof(TClassName));
    pObjectList->Free(_pObject);
}

// ---------------------------------------------------------------------------------------------------------------------

inline void CPoolManager::Free(void* _pObject, size_t _Size)
{
	CFreeList* pObjectList = FindListForSize(_Size);
    pObjectList->Free(_pObject);
}

#endif
#endif